public class Xiaoqiu {
    public static void main(String[] args) {
        int count=1;
        double h=10;
        double sum=0;
     for (;count<1000;count++){
         h*=0.8;
         sum+=h;

         if (h<0.01){
             System.out.println("sum="+sum);
             break;

         }
         System.out.println("次数="+count);



     }

    }
}
